module PromotionMailsHelper

  def deliver_available?(mail)
    return false unless current_admin.can? :deliver_mail
    mail.can_start?
  end

  def pause_available?(mail_or_delivery)
    return false unless current_admin.can? :deliver_mail
    mail_or_delivery.can_pause?
  end

  def resume_available?(mail_or_delivery)
    return false unless current_admin.can? :deliver_mail
    mail_or_delivery.can_resume?
  end

  def stop_available?(mail_or_delivery)
    return false unless current_admin.can? :deliver_mail
    mail_or_delivery.can_stop?
  end

end
